<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>

  <body>
    <div id="app">
      <h1 id="t1">hello</h1>
      <h2 ref="t2">jack</h2>
      <h3 ref="t3">!!</h3>
    </div>
    <script type="module">
      import { createApp, ref, onMounted } from "./vue.esm-browser.js";
      const app = createApp({
        setup() {
          const t2 = ref(null);
          const t3 = ref(null);
          onMounted(() => {
            console.log(document.getElementById("t1"));
            console.log(t2.value);
            console.log(t3.value);
          });
          return {
            t2,
            t3,
          };
        },
      });

      app.mount("#app"); //挂载
    </script>
  </body>
</html>
